/**
  * The enum options will be stored as they are given without splitting or processing the values.
  * @depends testWhenTheInputDescribesAnEnumThenReturnAnEnumValueObject
  * @param VO $instance
  */
 public function testTheEnumOptionsWillBeStoredAsTheyAreGivenWithoutSplittingOrProcessingTheValues(VO $instance)
 {
     TestHelper::assertValueObjectHasValue($instance, '1,2,3,4,\'5\'');
 }
 /**
  * When the input is numeric then store value.
  */
 public function testWhenTheInputIsNumericThenStoreValue()
 {
     $instance = new FieldType(12.3);
     TestHelper::assertValueObjectHasValue($instance, 12.3);
 }
 /**
  * When the arguments are integers then build the object.
  */
 public function testWhenTheArgumentsAreIntegersThenBuildTheObject()
 {
     $instance = new FieldType\Decimal(10, 7);
     TestHelper::assertValueObjectHasValue($instance, 10, 'digits');
     TestHelper::assertValueObjectHasValue($instance, 7, 'decimals');
 }
 /**
  * When called will use first argument to create a new instance.
  */
 public function testWhenCalledWillUseFirstArgumentToCreateANewInstance()
 {
     $value = 'AAA123';
     $result = StringLiteral::fromNative($value);
     TestHelper::assertValueObjectHasValue($result, $value);
 }
 /**
  * When a scalar or null value is given then build object and store set value.
  *
  * @dataProvider dataProviderScalarValues
  * @param mixed $value
  */
 public function testWhenAScalarOrNullValueIsGivenThenBuildObjectAndStoreSetValue($value)
 {
     $instance = FieldDefaultValue::fromNative($value);
     TestHelper::assertValueObjectHasValue($instance, $value);
 }
 protected function prepareInternalFunctionsOverride()
 {
     $spy = \Mockery::mock('Internal');
     $spy->shouldReceive('DatabaseInspect\\Console\\Command\\date')->once()->with('Ymdhis')->andReturn($this->expectedDate);
     $spy->shouldReceive('DatabaseInspect\\Console\\Command\\json_encode')->once()->with($this->schemaContentsResponse, JSON_PRETTY_PRINT)->andReturn($this->schemaContentsJsonResponse);
     $spy->shouldReceive('DatabaseInspect\\Console\\Command\\file_put_contents')->once()->with($this->expectedFilename, $this->schemaContentsJsonResponse);
     TestHelper::$spy = $spy;
 }
 /**
  * When an empty string is given then build object.
  */
 public function testWhenAnEmptyStringIsGivenThenBuildObject()
 {
     $instance = new StringLiteral($this->emptyString);
     static::assertInstanceOf(StringLiteral::class, $instance);
     TestHelper::assertValueObjectHasValue($instance, $this->emptyString);
 }
function file_put_contents()
{
    return TestHelper::bypassOrPassthru(__FUNCTION__, func_get_args());
}