summaryrefslogtreecommitdiff
path: root/Zend/tests/assert/bug70528.phpt
blob: 1b5803859c386d018fce6689ec24b9f102283bb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--TEST--
Bug #70528 (assert() with instanceof adds apostrophes around class name)
--INI--
zend.assertions=1
assert.exception=0
assert.warning=1
--FILE--
<?php

namespace Foo;
class Bar {}

$bar = "Bar";
assert(new \stdClass instanceof $bar);
assert(new \stdClass instanceof Bar);
assert(new \stdClass instanceof \Foo\Bar);
?>
--EXPECTF--
Warning: assert(): assert(new \stdClass() instanceof $bar) failed in %sbug70528.php on line %d

Warning: assert(): assert(new \stdClass() instanceof Bar) failed in %sbug70528.php on line %d

Warning: assert(): assert(new \stdClass() instanceof \Foo\Bar) failed in %sbug70528.php on line %d