예제 #1
0
 /**
  * @covers ::jsonSerialize
  */
 public function test_jsonSerialize()
 {
     // Given
     $e = new DatabaseException('my message', 1234);
     // When
     $std = $e->jsonSerialize();
     // Then
     $this->assertInstanceOf('stdClass', $std);
     $exp = ['code' => 1234, 'message' => 'my message'];
     $this->assertSame($exp, (array) $exp);
 }