Exemplo n.º 1
0
 public function testGetAttributes()
 {
     $date = new \MongoDate();
     $model = new TestSchema(['title' => 'Title', 'created' => $date]);
     $actual = $model->getAttributes();
     $expected = ['_id' => null, 'title' => 'Title', 'object' => null, 'init_test' => true, 'created' => $date];
     $this->assertEquals($expected, $actual);
     $actual = $model->getAttributes(['title', 'object']);
     $expected = ['title' => 'Title', 'object' => null];
     $this->assertEquals($expected, $actual);
 }