Merge "Type hint against LinkTarget in WatchedItemStore"
[lhc/web/wiklou.git] / tests / phpunit / includes / libs / ParamValidator / TypeDef / PresenceBooleanDefTest.php
1 <?php
2
3 namespace Wikimedia\ParamValidator\TypeDef;
4
5 use Wikimedia\ParamValidator\ParamValidator;
6
7 /**
8 * @covers Wikimedia\ParamValidator\TypeDef\PresenceBooleanDef
9 */
10 class PresenceBooleanDefTest extends TypeDefTestCase {
11
12 protected static $testClass = PresenceBooleanDef::class;
13
14 public function provideValidate() {
15 return [
16 [ null, false ],
17 [ '', true ],
18 [ '0', true ],
19 [ '1', true ],
20 [ 'anything really', true ],
21 ];
22 }
23
24 public function provideDescribeSettings() {
25 return [
26 [ [], [], [] ],
27 [ [ ParamValidator::PARAM_DEFAULT => 'foo' ], [], [] ],
28 ];
29 }
30
31 }