Skip to content

Commit

Permalink
Update test case for ActivityNoticeSerializer
Browse files Browse the repository at this point in the history
  • Loading branch information
Bui Sy Nguyen committed Aug 19, 2015
1 parent 790d406 commit 2c98001
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/ActivityNoticeSerializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,17 @@ public function testGetSerializeData04()
$model = new TestModel02();
$model->model1 = new TestModel01();
$model->model1->field1 = "ABC";
$model->model1->field2 = "XYZ";

$config = $helper->getActivityNoticeConfig('testModel02', 'update', null);

$data = $helper->getSerializeData($model, $config);

$this->assertArrayHasKey('model1',$data);
$this->assertNotNull($data['model1']);
$this->assertInstanceOf('TestModel01', $data['model1']);
$this->assertEquals('ABC',$data['model1']->{'field1'});
$this->assertTrue(is_array($data['model1']));
$this->assertEquals('ABC',$data['model1']['field1']);
$this->assertArrayNotHasKey('field2',$data['model1']);
}

public function testGetSerializeData05()
Expand Down

0 comments on commit 2c98001

Please sign in to comment.