public function test_it_gets_error_string() { $this->validator->getErrors()->shouldBeCalled()->willReturn([['property' => 'foo', 'message' => 'bar']]); $errorMsg = sprintf("Provided values do not validate. Errors:\n[foo] bar\n"); $this->assertEquals($errorMsg, $this->schema->getErrorString()); }