for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Author: Nil Portugués Calderó <[email protected]>
* Date: 9/20/14
* Time: 11:52 AM
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Tests\NilPortugues\Validator\Validation;
use NilPortugues\Validator\Validation\GenericValidation;
* Class GenericAttributeTest
* @package Tests\NilPortugues\Validator\Validation
class GenericTest extends \PHPUnit_Framework_TestCase
{
* @test
public function itShouldCheckIfIsRequired()
$value = 'asdsdadds';
$result = GenericValidation::isRequired($value);
$this->assertTrue($result);
$value = null;
$this->assertFalse($result);
}
public function itShouldCheckIsNotNull()
$result = GenericValidation::isNotNull($value);
$value = '';