Exemple #1
0
 public function testJsonEncode_EncodesData()
 {
     $testData = 'something something 123';
     $testType = 'testType';
     $expected = json_encode(['type' => $testType, 'data' => $testData]);
     $this->abstractCommand->expects($this->once())->method('getType')->willReturn('testType');
     $this->abstractCommand->setData($testData);
     $this->assertJsonStringEqualsJsonString($expected, json_encode($this->abstractCommand));
 }