PHP Classes
elePHPant
Icontem

File: tests/unit/Del/Validator/FloatValidatorTest.php

Recommend this page to a friend!
  Classes of Derek McLean  >  HTML Forms  >  tests/unit/Del/Validator/FloatValidatorTest.php  >  Download  
File: tests/unit/Del/Validator/FloatValidatorTest.php
Role: Class source
Content type: text/plain
Description: Class source
Class: HTML Forms
Generate and validate submitted HTML forms
Author: By
Last change:
Date: 1 year ago
Size: 591 bytes
 

 

Contents

Class file image Download
<?php

namespace DelTesting\Form\Field;

use
Codeception\TestCase\Test;
use
Del\Form\Validator\FloatValidator;

/**
 * User: delboy1978uk
 * Date: 05/12/2016
 * Time: 02:27
 */
class FloatValidatorTest extends Test
{
    public function
testFloatValidation()
    {
       
$validator = new FloatValidator();
       
$this->assertTrue($validator->isValid(12.34));
       
$this->assertTrue($validator->isValid(56));
       
$this->assertTrue($validator->isValid('10.34'));
       
$this->assertTrue($validator->isValid('19'));
       
$this->assertFalse($validator->isValid('hello'));
    }
}