function it_provides_access_to_error_details(){
      $this->getCode()->shouldBe( 400 );
      $this->getErrorMessage()->shouldBeString();
      $this->getErrorMessage()->shouldBe( 'BadRequestError: "Missing personalisation: name"' );
      $this->getErrors()->shouldBeArray();
      $this->getErrors()[0]->shouldBeArray();
      $this->getErrors()[0]['error']->shouldBe('BadRequestError');
      $this->getErrors()[0]['message']->shouldBe('Missing personalisation: name');
    }
function it_provides_access_to_error_details(){
      $this->getCode()->shouldBe( 400 );
      $this->getErrorMessage()->shouldBeString();
      $this->getErrorMessage()->shouldBe( 'BadRequestError: "Missing personalisation: name"' );
      $this->getErrors()->shouldBeArray();
      $this->getErrors()[0]->shouldBeArray();
      $this->getErrors()[0]['error']->shouldBe('BadRequestError');
      $this->getErrors()[0]['message']->shouldBe('Missing personalisation: name');
    }
function it_provides_access_to_error_details ( ) { $ this -> getCode ( ) -> shouldBe ( 400 ) ; $ this -> getErrorMessage ( ) -> shouldBeString ( ) ; $ this -> getErrorMessage ( ) -> shouldBe ( 'BadRequestError: "Missing personalisation: name"' ) ; $ this -> getErrors ( ) -> shouldBeArray ( ) ; $ this -> getErrors ( ) [ 0 ] -> shouldBeArray ( ) ; $ this -> getErrors ( ) [ 0 ] [ 'error' ] -> shouldBe ( 'BadRequestError' ) ; $ this -> getErrors ( ) [ 0 ] [ 'message' ] -> shouldBe ( 'Missing personalisation: name' ) ; }
Test constructor variations
Test constructor variations