Skip to content

Commit

Permalink
TestCase for #2: wrong logic in noticeAfterModelAction()
Browse files Browse the repository at this point in the history
  • Loading branch information
tudv committed Jan 26, 2016
1 parent 91afe13 commit ff09f1b
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions tests/ActivityNoticeManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,34 @@ class ActivityNoticeManagerTest extends PHPUnit_Framework_TestCase
{
private $params = [];

public function testSendActivityNotice01()
public function testNoticeAfterModelActionForDeletingByPK()
{
$this->assertTrue(true);
$anm = new \fproject\amqp\ActivityNoticeManager();
$anm->params = [
'activityNotice' => [
'TestModel03' => [
'notifyActions' => '*',
'notSerializeAttributes' => '_explicitType'
],
],
'amqpSetting' =>
[
'host' => 'so.projectkit.net',
'port' => '5672',
'user' => 'pkadmin',
'password' => 'pkrb@12345',
'exchangeName' => 'pk-main.notices',
'routingKey' => 'rk.activity-notices'
],
];

/* $helper = new ActivityNoticeSerializer($this->params);
$config = $helper->getActivityNoticeConfig('TestModel03', 'delete', null, '1001');*/

$notice = $anm->noticeAfterModelAction(new TestModel03(), 'TestModel03', 'delete', null, '1001');

$this->assertEquals('1001', $notice->content);
}

}
?>

0 comments on commit ff09f1b

Please sign in to comment.