Passed
Push — master ( 8ff373...315bd9 )
by adam
01:44
created

StringValueParserTest::invalidInputProvider()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace ValueParsers\Tests;
6
7
use ValueParsers\ParserOptions;
8
use ValueParsers\StringValueParser;
9
10
/**
11
 * @covers \ValueParsers\StringValueParser
12
 *
13
 * @group ValueParsers
14
 * @group DataValueExtensions
15
 *
16
 * @license GPL-2.0-or-later
17
 * @author Jeroen De Dauw < [email protected] >
18
 */
19
abstract class StringValueParserTest extends ValueParserTestBase {
20
21
	/**
22
	 * @see ValueParserTestBase::invalidInputProvider
23
	 */
24
	public function invalidInputProvider() {
25
		return [
26
			[ true ],
27
			[ false ],
28
			[ null ],
29
			[ 4.2 ],
30
			[ [] ],
31
			[ 42 ],
32
		];
33
	}
34
35
	public function testSetAndGetOptions() {
36
		/** @var StringValueParser $parser */
37
		$parser = $this->getInstance();
38
		$options = new ParserOptions();
39
		$parser->setOptions( $options );
40
		$this->assertSame( $options, $parser->getOptions() );
41
	}
42
43
}
44