Exemplo n.º 1
0
 /**
  * @covers Redmine\Client
  * @test
  */
 public function testDecodeJsonWithSyntaxError()
 {
     // Test values
     $invalidJson = '"projects":[{"id":1,"name":"Redmine",' . '"identifier":"redmine","status":1,' . '"created_on":"2007-09-29T10:03:04Z"}],' . '"total_count":1,"offset":0,"limit":25';
     $expectedError = 'Syntax error';
     // Create the object under test
     $client = new Client('http://test.local', 'asdf');
     // Perform the tests
     $this->assertSame($expectedError, $client->decode($invalidJson));
 }