izzum\statemachine\loader\XMLTest::shouldThrowExceptionForBadXMLData PHP Method

shouldThrowExceptionForBadXMLData() public method

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