AssetManagerTest\Service\PathStackResolverTest::testSetPaths PHP Method

testSetPaths() public method

public testSetPaths ( )
    public function testSetPaths()
    {
        $resolver = new PathStackResolver();
        $resolver->setPaths(array('dir2', 'dir1'));
        // order inverted because of how a stack is traversed
        $this->assertSame(array('dir1' . DIRECTORY_SEPARATOR, 'dir2' . DIRECTORY_SEPARATOR), $resolver->getPaths()->toArray());
        $paths = new ArrayObject(array('dir4', 'dir3'));
        $resolver->setPaths($paths);
        $this->assertSame(array('dir3' . DIRECTORY_SEPARATOR, 'dir4' . DIRECTORY_SEPARATOR), $resolver->getPaths()->toArray());
        $this->setExpectedException(InvalidArgumentException::class);
        $resolver->setPaths('invalid');
    }