| @@ 9-64 (lines=56) @@ | ||
| 6 | /** |
|
| 7 | * Generated Test Class. |
|
| 8 | */ |
|
| 9 | class xsNonPositiveIntegerTest extends \PHPUnit_Framework_TestCase |
|
| 10 | { |
|
| 11 | /** |
|
| 12 | * Sets up the fixture, for example, opens a network connection. |
|
| 13 | * This method is called before a test is executed. |
|
| 14 | */ |
|
| 15 | protected function setUp() |
|
| 16 | { |
|
| 17 | parent::setUp(); |
|
| 18 | } |
|
| 19 | ||
| 20 | /** |
|
| 21 | * Tears down the fixture, for example, closes a network connection. |
|
| 22 | * This method is called after a test is executed. |
|
| 23 | */ |
|
| 24 | protected function tearDown() |
|
| 25 | { |
|
| 26 | parent::tearDown(); |
|
| 27 | } |
|
| 28 | ||
| 29 | /** |
|
| 30 | * @dataProvider testxsNonPositiveIntegerTestValidDataProvider |
|
| 31 | * @param mixed $duration |
|
| 32 | * @param mixed $message |
|
| 33 | */ |
|
| 34 | public function testxsNonPositiveIntegerTestValid($duration, $message) |
|
| 35 | { |
|
| 36 | $d = new xsNonPositiveInteger($duration); |
|
| 37 | $e = (string)$d; |
|
| 38 | $this->assertEquals($duration, $e, $message); |
|
| 39 | } |
|
| 40 | ||
| 41 | public function testxsNonPositiveIntegerTestValidDataProvider() |
|
| 42 | { |
|
| 43 | return array( |
|
| 44 | array(3, '3'), |
|
| 45 | array('0', 'Zero'), |
|
| 46 | array('-00122', 'leading zeros are permitted'), |
|
| 47 | ); |
|
| 48 | } |
|
| 49 | /** |
|
| 50 | * @dataProvider testxxsNonPositiveIntegerTestInvalidDataProvider |
|
| 51 | * @param mixed $duration |
|
| 52 | * @param mixed $message |
|
| 53 | */ |
|
| 54 | public function testxsNonPositiveIntegerTestInvalid($duration, $message) |
|
| 55 | { |
|
| 56 | $d = new xsNonPositiveInteger($duration); |
|
| 57 | $e = (string)$d; |
|
| 58 | $this->assertEquals('', $e, $message); |
|
| 59 | } |
|
| 60 | ||
| 61 | public function testxsPositiveIntegerTestInvalidDataProvider() |
|
| 62 | { |
|
| 63 | return array( |
|
| 64 | array('122', ' value cannot be positive'), |
|
| 65 | array('+3', 'value cannot be positive'), |
|
| 66 | array('3.0', 'value must not contain a decimal point'), |
|
| 67 | array('', ' an empty value is not valid, unless xsi:nil is used'), |
|
| @@ 9-64 (lines=56) @@ | ||
| 6 | /** |
|
| 7 | * Generated Test Class. |
|
| 8 | */ |
|
| 9 | class xsPositiveIntegerTest extends \PHPUnit_Framework_TestCase |
|
| 10 | { |
|
| 11 | /** |
|
| 12 | * Sets up the fixture, for example, opens a network connection. |
|
| 13 | * This method is called before a test is executed. |
|
| 14 | */ |
|
| 15 | protected function setUp() |
|
| 16 | { |
|
| 17 | parent::setUp(); |
|
| 18 | } |
|
| 19 | ||
| 20 | /** |
|
| 21 | * Tears down the fixture, for example, closes a network connection. |
|
| 22 | * This method is called after a test is executed. |
|
| 23 | */ |
|
| 24 | protected function tearDown() |
|
| 25 | { |
|
| 26 | parent::tearDown(); |
|
| 27 | } |
|
| 28 | ||
| 29 | /** |
|
| 30 | * @dataProvider testxsPositiveIntegerTestValidDataProvider |
|
| 31 | * @param mixed $duration |
|
| 32 | * @param mixed $message |
|
| 33 | */ |
|
| 34 | public function testxsPositiveIntegerTestValid($duration, $message) |
|
| 35 | { |
|
| 36 | $d = new xsPositiveInteger($duration); |
|
| 37 | $e = (string)$d; |
|
| 38 | $this->assertEquals($duration, $e, $message); |
|
| 39 | } |
|
| 40 | ||
| 41 | public function testxsPositiveIntegerTestValidDataProvider() |
|
| 42 | { |
|
| 43 | return array( |
|
| 44 | array(122, '122'), |
|
| 45 | array('+3', '122'), |
|
| 46 | array('00122', 'leading zeros are permitted'), |
|
| 47 | ); |
|
| 48 | } |
|
| 49 | /** |
|
| 50 | * @dataProvider testxsPositiveIntegerTestInvalidDataProvider |
|
| 51 | * @param mixed $duration |
|
| 52 | * @param mixed $message |
|
| 53 | */ |
|
| 54 | public function testxsPositiveIntegerTestInvalid($duration, $message) |
|
| 55 | { |
|
| 56 | $d = new xsPositiveInteger($duration); |
|
| 57 | $e = (string)$d; |
|
| 58 | $this->fail($message); |
|
| 59 | $this->assertEquals('', $e, $message); |
|
| 60 | } |
|
| 61 | ||
| 62 | public function testxsPositiveIntegerTestInvalidDataProvider() |
|
| 63 | { |
|
| 64 | return array( |
|
| 65 | array('0', '0 is not considered positive'), |
|
| 66 | array('-3', 'value cannot be negative'), |
|
| 67 | array('3.0', 'value must not contain a decimal point'), |
|
| @@ 9-65 (lines=57) @@ | ||
| 6 | /** |
|
| 7 | * Generated Test Class. |
|
| 8 | */ |
|
| 9 | class xsShortTest extends \PHPUnit_Framework_TestCase |
|
| 10 | { |
|
| 11 | /** |
|
| 12 | * Sets up the fixture, for example, opens a network connection. |
|
| 13 | * This method is called before a test is executed. |
|
| 14 | */ |
|
| 15 | protected function setUp() |
|
| 16 | { |
|
| 17 | parent::setUp(); |
|
| 18 | } |
|
| 19 | ||
| 20 | /** |
|
| 21 | * Tears down the fixture, for example, closes a network connection. |
|
| 22 | * This method is called after a test is executed. |
|
| 23 | */ |
|
| 24 | protected function tearDown() |
|
| 25 | { |
|
| 26 | parent::tearDown(); |
|
| 27 | } |
|
| 28 | ||
| 29 | /** |
|
| 30 | * @dataProvider testxsShortTestValidDataProvider |
|
| 31 | * @param mixed $duration |
|
| 32 | * @param mixed $message |
|
| 33 | */ |
|
| 34 | public function testxsShortTestValid($duration, $message) |
|
| 35 | { |
|
| 36 | $d = new xsShort($duration); |
|
| 37 | $e = (string)$d; |
|
| 38 | $this->assertEquals($duration, $e, $message); |
|
| 39 | } |
|
| 40 | ||
| 41 | public function testxsShortTestValidDataProvider() |
|
| 42 | { |
|
| 43 | return array( |
|
| 44 | array(+3, 'Positive 1'), |
|
| 45 | array('122', '122'), |
|
| 46 | array('0', 'zero'), |
|
| 47 | array(-1231, 'negative 1231'), |
|
| 48 | ||
| 49 | ); |
|
| 50 | } |
|
| 51 | /** |
|
| 52 | * @dataProvider testxsShortTestInvalidDataProvider |
|
| 53 | * @param mixed $duration |
|
| 54 | * @param mixed $message |
|
| 55 | */ |
|
| 56 | public function testxsShortTestInvalid($duration, $message) |
|
| 57 | { |
|
| 58 | $d = new xsShort($duration); |
|
| 59 | $e = (string)$d; |
|
| 60 | $this->fail($message); |
|
| 61 | $this->assertEquals('', $e, $message); |
|
| 62 | } |
|
| 63 | ||
| 64 | public function testxsShortTestInvalidDataProvider() |
|
| 65 | { |
|
| 66 | return array( |
|
| 67 | array('32770', 'number is too large'), |
|
| 68 | array('3.0', 'value must not contain a decimal point'), |
|
| @@ 9-64 (lines=56) @@ | ||
| 6 | /** |
|
| 7 | * Generated Test Class. |
|
| 8 | */ |
|
| 9 | class xsUnsignedByteTest extends \PHPUnit_Framework_TestCase |
|
| 10 | { |
|
| 11 | /** |
|
| 12 | * Sets up the fixture, for example, opens a network connection. |
|
| 13 | * This method is called before a test is executed. |
|
| 14 | */ |
|
| 15 | protected function setUp() |
|
| 16 | { |
|
| 17 | parent::setUp(); |
|
| 18 | } |
|
| 19 | ||
| 20 | /** |
|
| 21 | * Tears down the fixture, for example, closes a network connection. |
|
| 22 | * This method is called after a test is executed. |
|
| 23 | */ |
|
| 24 | protected function tearDown() |
|
| 25 | { |
|
| 26 | parent::tearDown(); |
|
| 27 | } |
|
| 28 | ||
| 29 | /** |
|
| 30 | * @dataProvider testxsUnsignedByteTestValidDataProvider |
|
| 31 | * @param mixed $duration |
|
| 32 | * @param mixed $message |
|
| 33 | */ |
|
| 34 | public function testxsUnsignedByteTestValid($duration, $message) |
|
| 35 | { |
|
| 36 | $d = new xsUnsignedByte($duration); |
|
| 37 | $e = (string)$d; |
|
| 38 | $this->assertEquals($duration, $e, $message); |
|
| 39 | } |
|
| 40 | ||
| 41 | public function testxsUnsignedByteTestValidDataProvider() |
|
| 42 | { |
|
| 43 | return array( |
|
| 44 | array(+3, 'Positive 1'), |
|
| 45 | array('122', '122'), |
|
| 46 | array('0', 'zero'), |
|
| 47 | ); |
|
| 48 | } |
|
| 49 | /** |
|
| 50 | * @dataProvider testxsUnsignedByteTestInvalidDataProvider |
|
| 51 | * @param mixed $duration |
|
| 52 | * @param mixed $message |
|
| 53 | */ |
|
| 54 | public function testxsUnsignedByteTestInvalid($duration, $message) |
|
| 55 | { |
|
| 56 | $d = new xsUnsignedByte($duration); |
|
| 57 | $e = (string)$d; |
|
| 58 | $this->assertEquals('', $e, $message); |
|
| 59 | } |
|
| 60 | ||
| 61 | public function testxsUnsignedByteTestInvalidDataProvider() |
|
| 62 | { |
|
| 63 | return array( |
|
| 64 | array('-123', ' negative values are not allowed'), |
|
| 65 | array('256', 'number is too large'), |
|
| 66 | array('3.0', 'value must not contain a decimal point'), |
|
| 67 | array('', ' an empty value is not valid, unless xsi:nil is used'), |
|
| @@ 9-64 (lines=56) @@ | ||
| 6 | /** |
|
| 7 | * Generated Test Class. |
|
| 8 | */ |
|
| 9 | class xsUnsignedIntTest extends \PHPUnit_Framework_TestCase |
|
| 10 | { |
|
| 11 | /** |
|
| 12 | * Sets up the fixture, for example, opens a network connection. |
|
| 13 | * This method is called before a test is executed. |
|
| 14 | */ |
|
| 15 | protected function setUp() |
|
| 16 | { |
|
| 17 | parent::setUp(); |
|
| 18 | } |
|
| 19 | ||
| 20 | /** |
|
| 21 | * Tears down the fixture, for example, closes a network connection. |
|
| 22 | * This method is called after a test is executed. |
|
| 23 | */ |
|
| 24 | protected function tearDown() |
|
| 25 | { |
|
| 26 | parent::tearDown(); |
|
| 27 | } |
|
| 28 | ||
| 29 | /** |
|
| 30 | * @dataProvider testxsUnsignedIntTestValidDataProvider |
|
| 31 | * @param mixed $duration |
|
| 32 | * @param mixed $message |
|
| 33 | */ |
|
| 34 | public function testxsUnsignedIntTestValid($duration, $message) |
|
| 35 | { |
|
| 36 | $d = new xsUnsignedInt($duration); |
|
| 37 | $e = (string)$d; |
|
| 38 | $this->assertEquals($duration, $e, $message); |
|
| 39 | } |
|
| 40 | ||
| 41 | public function testxsUnsignedIntTestValidDataProvider() |
|
| 42 | { |
|
| 43 | return array( |
|
| 44 | array(+3, 'Positive 1'), |
|
| 45 | array('122', '122'), |
|
| 46 | array('0', 'zero'), |
|
| 47 | ); |
|
| 48 | } |
|
| 49 | /** |
|
| 50 | * @dataProvider testxsUnsignedIntTestInvalidDataProvider |
|
| 51 | * @param mixed $duration |
|
| 52 | * @param mixed $message |
|
| 53 | */ |
|
| 54 | public function testxsUnsignedIntTestInvalid($duration, $message) |
|
| 55 | { |
|
| 56 | $d = new xsUnsignedInt($duration); |
|
| 57 | $e = (string)$d; |
|
| 58 | $this->assertEquals('', $e, $message); |
|
| 59 | } |
|
| 60 | ||
| 61 | public function testxsUnsignedIntTestInvalidDataProvider() |
|
| 62 | { |
|
| 63 | return array( |
|
| 64 | array('-123', ' negative values are not allowed'), |
|
| 65 | array('4294967299', 'number is too large'), |
|
| 66 | array('3.0', 'value must not contain a decimal point'), |
|
| 67 | array('', ' an empty value is not valid, unless xsi:nil is used'), |
|
| @@ 9-63 (lines=55) @@ | ||
| 6 | /** |
|
| 7 | * Generated Test Class. |
|
| 8 | */ |
|
| 9 | class xsUnsignedLongTest extends \PHPUnit_Framework_TestCase |
|
| 10 | { |
|
| 11 | /** |
|
| 12 | * Sets up the fixture, for example, opens a network connection. |
|
| 13 | * This method is called before a test is executed. |
|
| 14 | */ |
|
| 15 | protected function setUp() |
|
| 16 | { |
|
| 17 | parent::setUp(); |
|
| 18 | } |
|
| 19 | ||
| 20 | /** |
|
| 21 | * Tears down the fixture, for example, closes a network connection. |
|
| 22 | * This method is called after a test is executed. |
|
| 23 | */ |
|
| 24 | protected function tearDown() |
|
| 25 | { |
|
| 26 | parent::tearDown(); |
|
| 27 | } |
|
| 28 | ||
| 29 | /** |
|
| 30 | * @dataProvider testxsUnsignedLongTestValidDataProvider |
|
| 31 | * @param mixed $duration |
|
| 32 | * @param mixed $message |
|
| 33 | */ |
|
| 34 | public function testxsUnsignedLongTestValid($duration, $message) |
|
| 35 | { |
|
| 36 | $d = new xsUnsignedLong($duration); |
|
| 37 | $e = (string)$d; |
|
| 38 | $this->assertEquals($duration, $e, $message); |
|
| 39 | } |
|
| 40 | ||
| 41 | public function testxsUnsignedLongTestValidDataProvider() |
|
| 42 | { |
|
| 43 | return array( |
|
| 44 | array(+3, 'Positive 1'), |
|
| 45 | array('122', '122'), |
|
| 46 | array('0', 'zero'), |
|
| 47 | ); |
|
| 48 | } |
|
| 49 | /** |
|
| 50 | * @dataProvider testxsUnsignedLongTestInvalidDataProvider |
|
| 51 | * @param mixed $duration |
|
| 52 | * @param mixed $message |
|
| 53 | */ |
|
| 54 | public function testxsUnsignedLongTestInvalid($duration, $message) |
|
| 55 | { |
|
| 56 | $d = new xsUnsignedLong($duration); |
|
| 57 | $e = (string)$d; |
|
| 58 | $this->assertEquals('', $e, $message); |
|
| 59 | } |
|
| 60 | ||
| 61 | public function testxsUnsignedLongTestInvalidDataProvider() |
|
| 62 | { |
|
| 63 | return array( |
|
| 64 | array('-123', ' negative values are not allowed'), |
|
| 65 | array('18446744073709551620', 'number is too large'), |
|
| 66 | array('3.0', 'value must not contain a decimal point'), |
|
| @@ 9-63 (lines=55) @@ | ||
| 6 | /** |
|
| 7 | * Generated Test Class. |
|
| 8 | */ |
|
| 9 | class xsUnsignedShortTest extends \PHPUnit_Framework_TestCase |
|
| 10 | { |
|
| 11 | /** |
|
| 12 | * Sets up the fixture, for example, opens a network connection. |
|
| 13 | * This method is called before a test is executed. |
|
| 14 | */ |
|
| 15 | protected function setUp() |
|
| 16 | { |
|
| 17 | parent::setUp(); |
|
| 18 | } |
|
| 19 | ||
| 20 | /** |
|
| 21 | * Tears down the fixture, for example, closes a network connection. |
|
| 22 | * This method is called after a test is executed. |
|
| 23 | */ |
|
| 24 | protected function tearDown() |
|
| 25 | { |
|
| 26 | parent::tearDown(); |
|
| 27 | } |
|
| 28 | ||
| 29 | /** |
|
| 30 | * @dataProvider testxsUnsignedShortTestValidDataProvider |
|
| 31 | * @param mixed $duration |
|
| 32 | * @param mixed $message |
|
| 33 | */ |
|
| 34 | public function testxsUnsignedShortTestValid($duration, $message) |
|
| 35 | { |
|
| 36 | $d = new xsUnsignedShort($duration); |
|
| 37 | $e = (string)$d; |
|
| 38 | $this->assertEquals($duration, $e, $message); |
|
| 39 | } |
|
| 40 | ||
| 41 | public function testxsUnsignedShortTestValidDataProvider() |
|
| 42 | { |
|
| 43 | return array( |
|
| 44 | array(+3, 'Positive 1'), |
|
| 45 | array('122', '122'), |
|
| 46 | array('0', 'zero'), |
|
| 47 | ); |
|
| 48 | } |
|
| 49 | /** |
|
| 50 | * @dataProvider testxsUnsignedShortTestInvalidDataProvider |
|
| 51 | * @param mixed $duration |
|
| 52 | * @param mixed $message |
|
| 53 | */ |
|
| 54 | public function testxsUnsignedShortTestInvalid($duration, $message) |
|
| 55 | { |
|
| 56 | $d = new xsUnsignedShort($duration); |
|
| 57 | $e = (string)$d; |
|
| 58 | $this->assertEquals('', $e, $message); |
|
| 59 | } |
|
| 60 | ||
| 61 | public function testxsUnsignedShortTestInvalidDataProvider() |
|
| 62 | { |
|
| 63 | return array( |
|
| 64 | array('-123', ' negative values are not allowed'), |
|
| 65 | array('65540', 'number is too large'), |
|
| 66 | array('3.0', 'value must not contain a decimal point'), |
|