Lines Matching refs:slice
39 $this->assertEquals(new Name('foo\bar\baz'), $name->slice(0));
40 $this->assertEquals(new Name('bar\baz'), $name->slice(1));
41 $this->assertNull($name->slice(3));
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));
45 $this->assertNull($name->slice(0, -3));
46 $this->assertEquals(new Name('bar'), $name->slice(1, -1));
47 $this->assertNull($name->slice(1, -2));
48 $this->assertEquals(new Name('bar'), $name->slice(-2, 1));
49 $this->assertEquals(new Name('bar'), $name->slice(-2, -1));
50 $this->assertNull($name->slice(-2, -2));
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);