Sokil\Mongo\DocumentEventTest::testOnAfterConstruct PHP Method

testOnAfterConstruct() public method

    public function testOnAfterConstruct()
    {
        $collectionMock = $this->getMock('\\Sokil\\Mongo\\Collection', array('getDocumentClassName'), array($this->collection->getDatabase(), 'phpmongo_test_collection'));
        $collectionMock->expects($this->once())->method('getDocumentClassName')->will($this->returnValue('\\Sokil\\Mongo\\DocumentWithAfterConstructEvent'));
        $document = $collectionMock->createDocument();
        $this->assertEquals(true, $document->status);
    }