izzum\statemachine\loader\XMLTest::shouldThrowExceptionForNonExistentFileLoading PHP Метод

shouldThrowExceptionForNonExistentFileLoading() публичный Метод

    public function shouldThrowExceptionForNonExistentFileLoading()
    {
        $machine = new StateMachine(new Context(new Identifier('xml-test', 'xml-machine')));
        try {
            $loader = XML::createFromFile(__DIR__ . '/bogus.xml');
            $this->fail('should not come here');
        } catch (Exception $e) {
            $this->assertEquals(Exception::BAD_LOADERDATA, $e->getCode());
            $this->assertContains('bogus', $e->getMessage());
            $this->assertContains('does not exist', $e->getMessage());
        }
    }