コード例 #1
0
 /**
  * Returns the string "text".
  */
 public function testReturnsTheStringText()
 {
     $instance = new FieldType\Text();
     $result = $instance->toNative();
     static::assertEquals('text', $result);
 }
コード例 #2
0
 /**
  * Throws a BadMethodCallException because no native is allowed for this type.
  * @expectedException \BadMethodCallException
  * @expectedExceptionMessage Cannot create a Text object via this method.
  */
 public function testThrowsABadMethodCallExceptionBecauseNoNativeIsAllowedForThisType()
 {
     FieldType\Text::fromNative();
 }