Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
A test I had added didn't actually add any assertions due to a line b…
Browse files Browse the repository at this point in the history
…eing commented out.
  • Loading branch information
zburnham committed Apr 2, 2013
1 parent a3f9ec9 commit 1ba74d2
Showing 1 changed file with 1 addition and 44 deletions.
45 changes: 1 addition & 44 deletions tests/ZendTest/InputFilter/BaseInputFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -572,49 +572,6 @@ public static function contextDataProvider()
);
}

// /**
// * Idea here is that an empty field may or may not be valid based on
// * context.
// */
// /**
// * @dataProvider contextDataProvider()
// */
// public function testValidationMarksInputValidWhenAllowEmptyFlagIsTrueAndContinueIfEmptyIsTrueAndContextValidatesEmptyField($allowEmpty, $blankIsValid, $valid)
// {
// // $this->markTestSkipped();
//
// $filter = new InputFilter();
//
// $data = array (
// 'allowEmpty' => $allowEmpty,
// 'blankIsValid' => $blankIsValid,
// );
//
// $allowEmpty = new Input();
// $allowEmpty->setAllowEmpty(true)
// ->setContinueIfEmpty(true);
//
// $blankIsValid = new Input();
// $blankIsValid->getValidatorChain()->attach(new Validator\Callback(function($value, $context) {
// return ('y' === $value && empty($context['allowEmpty']));
// }));
//
// $filter->add($allowEmpty, 'allowEmpty')
// ->add($blankIsValid, 'blankIsValid');
// $filter->setData($data);
//// die(var_dump($filter->get('blankIsValid')));
//
// //$this->assertSame($valid, $filter->isValid());
// }
//
// public static function contextDataProvider()
// {
// return array(
// array('', 'y', true),
// array('', 'n', false),
// );
// }

/**
* Idea here is that an empty field may or may not be valid based on
* context.
Expand Down Expand Up @@ -647,7 +604,7 @@ public function testValidationMarksInputValidWhenAllowEmptyFlagIsTrueAndContinue
$filter->setData($data);
// die(var_dump($filter->get('blankIsValid')));

//$this->assertSame($valid, $filter->isValid());
$this->assertSame($valid, $filter->isValid());
}

public function testCanRetrieveRawValuesIndividuallyWithoutValidating()
Expand Down

0 comments on commit 1ba74d2

Please sign in to comment.