izzum\statemachine\loader\YAMLTest::shouldThrowExceptionForNoMachineData PHP Method

shouldThrowExceptionForNoMachineData() public method

    public function shouldThrowExceptionForNoMachineData()
    {
        $machine = new StateMachine(new Context(new Identifier('yaml-test', 'yaml-machine')));
        $loader = YAML::createFromFile(__DIR__ . '/fixture-no-machines.yaml');
        try {
            $loader->load($machine);
            $this->fail('should not come here');
        } catch (Exception $e) {
            $this->assertEquals(Exception::BAD_LOADERDATA, $e->getCode());
            $this->assertContains('no machine data', $e->getMessage());
        }
    }