Elgg\Di\DiContainerTest::testSetClassNames PHP Method

testSetClassNames() public method

public testSetClassNames ( )
    public function testSetClassNames()
    {
        $di = new \Elgg\Di\DiContainer();
        $di->setClassName('foo', self::TEST_CLASS);
        $this->assertInstanceOf(self::TEST_CLASS, $di->foo);
        $this->setExpectedException('InvalidArgumentException', 'Class names must be valid PHP class names');
        $di->setClassName('foo', array());
    }