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

shouldThrowExceptionForNonExistentFileLoading() public method

    public function shouldThrowExceptionForNonExistentFileLoading()
    {
        $machine = new StateMachine(new Context(new Identifier('yaml-test', 'yaml-machine')));
        try {
            $loader = YAML::createFromFile(__DIR__ . '/bogus.yaml');
            $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());
        }
    }