public function testSetExpectedAndReceived() { $instance = new MismatchedDataTypesException(ScalarTypes::SCALAR_FLOAT, 45); $instance->setExpectedAndReceived(ScalarTypes::SCALAR_STRING, true); $this->assertEquals(ScalarTypes::SCALAR_STRING, $instance->getExpected()); $this->assertEquals(ScalarTypes::SCALAR_BOOLEAN, $instance->getReceived()); }
/** * @param string|object $received * * @throws MismatchedDataTypesException */ protected function throwMismatchedDataTypeException($received) { throw MismatchedDataTypesException::create(static::class, $received); }