lithium\tests\cases\core\LibrariesTest::testServiceLocateInstantiation PHP Method

testServiceLocateInstantiation() public method

    public function testServiceLocateInstantiation()
    {
        $result = Libraries::instance('adapter.template.view', 'Simple');
        $this->assertInstanceOf('lithium\\template\\view\\adapter\\Simple', $result);
        $expected = "Class `Foo` of type `adapter.template.view` not found.";
        $this->assertException($expected, function () {
            Libraries::instance('adapter.template.view', 'Foo');
        });
    }