Lines Matching refs:Name
7 $name = new Name(['foo', 'bar']);
10 $name = new Name('foo\bar');
13 $name = new Name($name);
18 $name = new Name('foo');
23 $name = new Name('foo\bar');
30 $name = new Name('Foo\Bar');
38 $name = new Name('foo\bar\baz');
39 $this->assertEquals(new Name('foo\bar\baz'), $name->slice(0));
40 $this->assertEquals(new Name('bar\baz'), $name->slice(1));
42 $this->assertEquals(new Name('foo\bar\baz'), $name->slice(-3));
43 $this->assertEquals(new Name('bar\baz'), $name->slice(-2));
44 $this->assertEquals(new Name('foo\bar'), $name->slice(0, -1));
46 $this->assertEquals(new Name('bar'), $name->slice(1, -1));
48 $this->assertEquals(new Name('bar'), $name->slice(-2, 1));
49 $this->assertEquals(new Name('bar'), $name->slice(-2, -1));
56 (new Name('foo\bar\baz'))->slice(4);
62 (new Name('foo\bar\baz'))->slice(-4);
68 (new Name('foo\bar\baz'))->slice(0, 4);
74 (new Name('foo\bar\baz'))->slice(0, -4);
80 (new Name('foo\bar\baz'))->slice(1, 3);
84 $this->assertEquals(new Name('foo\bar\baz'), Name::concat('foo', 'bar\baz'));
86 new Name\FullyQualified('foo\bar'),
87 Name\FullyQualified::concat(['foo'], new Name('bar'))
92 new Name\Relative('foo\bar\baz', $attributes),
93 Name\Relative::concat(new Name\FullyQualified('foo\bar'), 'baz', $attributes)
96 $this->assertEquals(new Name('foo'), Name::concat(null, 'foo'));
97 $this->assertEquals(new Name('foo'), Name::concat('foo', null));
98 $this->assertNull(Name::concat(null, null));
102 $name = new Name('foo');
109 $name = new Name('foo\bar');
116 $name = new Name\FullyQualified('foo');
123 $name = new Name\Relative('foo');
134 Name::concat('foo', new \stdClass());
140 new Name('');
146 new Name([]);
151 $name = new Name($name);