Example #1
0
 /**
  * Test for `Field::notNull()`.
  *
  * @since 1.0.0
  * @access public
  *
  * @requires function Freyja\Database\Schema\Field::__construct
  * @requires function Freyja\Database\Schema\Field::notNull
  * @requires function ReflectionProperty::setAccessible
  * @requires function ReflectionProperty::getValue
  */
 public function testNotNull()
 {
     // Set accessibility to object property.
     $reflection_nullable = new ReflectionProperty('Freyja\\Database\\Schema\\Field', 'nullable');
     $reflection_nullable->setAccessible(true);
     $field = new Field('name');
     $field->notNull();
     $nullable = $reflection_nullable->getValue($field);
     $this->assertFalse($nullable, 'Failed asserting that Field::notNull() correctly set the field to NOT NULL.');
 }