lithium\tests\cases\core\ObjectTest::testStateBasedInstantiation PHP Method

testStateBasedInstantiation() public method

Tests that an object can be instantiated using the magic __set_state() method.
    public function testStateBasedInstantiation()
    {
        $result = MockObjectConfiguration::__set_state(array('key' => 'value', '_protected' => 'test'));
        $expected = 'lithium\\tests\\mocks\\core\\MockObjectConfiguration';
        $this->assertEqual($expected, get_class($result));
        $this->assertEqual('test', $result->getProtected());
    }