Definition at line 29 of file DatasetTest.php.
◆ getExtendedDimensions()
DatasetTest::getExtendedDimensions |
( |
| ) |
|
|
protected |
Definition at line 44 of file DatasetTest.php.
Referenced by testMaxValue(), and testMinValue().
46 $c_dimension = $this->f->dimension()->cardinal();
47 $r_dimension = $this->f->dimension()->range($c_dimension);
49 "First dimension" => $c_dimension,
50 "Second dimension" => $c_dimension,
51 "Third dimension" => $r_dimension
◆ getSimpleDimensions()
DatasetTest::getSimpleDimensions |
( |
| ) |
|
|
protected |
◆ setUp()
◆ testDimensions()
DatasetTest::testDimensions |
( |
| ) |
|
◆ testInvalidDimension()
DatasetTest::testInvalidDimension |
( |
| ) |
|
Definition at line 68 of file DatasetTest.php.
References Vendor\Package\$e.
71 $dimension =
"Dimension";
72 $dataset = $this->f->dataset([
"A dimension" => $dimension]);
73 $this->assertFalse(
"This should not happen.");
75 $this->assertTrue(
true);
◆ testInvalidDimensionKey()
DatasetTest::testInvalidDimensionKey |
( |
| ) |
|
Definition at line 79 of file DatasetTest.php.
References Vendor\Package\$e.
82 $dimension = $this->f->dimension()->cardinal();
83 $dataset = $this->f->dataset([1 => $dimension]);
84 $this->assertFalse(
"This should not happen.");
86 $this->assertTrue(
true);
◆ testMaxValue()
DatasetTest::testMaxValue |
( |
| ) |
|
Definition at line 203 of file DatasetTest.php.
References getExtendedDimensions().
206 $points1 = [
"First dimension" => 0,
"Second dimension" => -0.5,
"Third dimension" => [0, 1]];
207 $points2 = [
"First dimension" => -3,
"Second dimension" => -5,
"Third dimension" => [-4, 1.5]];
208 $dataset = $dataset->withPoint(
212 $dataset = $dataset->withPoint(
216 $this->assertEquals(0, $dataset->getMaxValueForDimension(
"First dimension"));
217 $this->assertEquals(-0.5, $dataset->getMaxValueForDimension(
"Second dimension"));
218 $this->assertEquals(1.5, $dataset->getMaxValueForDimension(
"Third dimension"));
◆ testMinValue()
DatasetTest::testMinValue |
( |
| ) |
|
Definition at line 180 of file DatasetTest.php.
References getExtendedDimensions().
183 $points1 = [
"First dimension" => 0,
"Second dimension" => 0.5,
"Third dimension" => [0, 1]];
184 $points2 = [
"First dimension" => -3,
"Second dimension" => 5,
"Third dimension" => [-4, -1.5]];
185 $points3 = [
"First dimension" => -2,
"Second dimension" => 5,
"Third dimension" => [-3, -1.5]];
186 $dataset = $dataset->withPoint(
190 $dataset = $dataset->withPoint(
194 $dataset = $dataset->withPoint(
198 $this->assertEquals(-2, $dataset->getMinValueForDimension(
"First dimension"));
199 $this->assertEquals(0.5, $dataset->getMinValueForDimension(
"Second dimension"));
200 $this->assertEquals(-3, $dataset->getMinValueForDimension(
"Third dimension"));
◆ testwithAlternativeInformation()
DatasetTest::testwithAlternativeInformation |
( |
| ) |
|
Definition at line 116 of file DatasetTest.php.
References getSimpleDimensions().
119 $info = [
"A dimension" =>
"An information",
"Another dimension" => null];
120 $dataset = $dataset->withAlternativeInformation(
124 $this->assertEquals([
"Item" => $info], $dataset->getAlternativeInformation());
◆ testwithInvalidAlternativeInformationCount()
DatasetTest::testwithInvalidAlternativeInformationCount |
( |
| ) |
|
Definition at line 127 of file DatasetTest.php.
References Vendor\Package\$e, and getSimpleDimensions().
131 $info = [
"A dimension" =>
"An information",
"Second dimension" => null];
132 $dataset = $dataset->withAlternativeInformation(
136 $this->assertFalse(
"This should not happen.");
137 }
catch (\ArgumentCountError
$e) {
138 $this->assertTrue(
true);
◆ testwithInvalidAlternativeInformationValue()
DatasetTest::testwithInvalidAlternativeInformationValue |
( |
| ) |
|
Definition at line 142 of file DatasetTest.php.
References Vendor\Package\$e, and getSimpleDimensions().
146 $info = [
"A dimension" =>
"An information",
"Another dimension" => 1];
147 $dataset = $dataset->withAlternativeInformation(
151 $this->assertFalse(
"This should not happen.");
153 $this->assertTrue(
true);
◆ testwithInvalidPointsCount()
DatasetTest::testwithInvalidPointsCount |
( |
| ) |
|
Definition at line 101 of file DatasetTest.php.
References Vendor\Package\$e, and getSimpleDimensions().
105 $points = [
"A dimension" => 1,
"Second dimension" => 2];
106 $dataset = $dataset->withPoint(
110 $this->assertFalse(
"This should not happen.");
111 }
catch (\ArgumentCountError
$e) {
112 $this->assertTrue(
true);
◆ testwithPoint()
DatasetTest::testwithPoint |
( |
| ) |
|
Definition at line 90 of file DatasetTest.php.
References getSimpleDimensions().
93 $points = [
"A dimension" => 1,
"Another dimension" => 2];
94 $dataset = $dataset->withPoint(
98 $this->assertEquals([
"Item" => $points], $dataset->getPoints());
◆ testwithResetDataset()
DatasetTest::testwithResetDataset |
( |
| ) |
|
Definition at line 157 of file DatasetTest.php.
References getSimpleDimensions().
160 $points = [
"A dimension" => 1,
"Another dimension" => 2];
161 $info = [
"A dimension" =>
"An information",
"Another dimension" => null];
162 $dataset = $dataset->withPoint(
166 $dataset = $dataset->withAlternativeInformation(
171 $this->assertEquals(
false, $dataset->isEmpty());
173 $dataset = $dataset->withResetDataset();
175 $this->assertEquals(
true, $dataset->isEmpty());
176 $this->assertEquals([], $dataset->getPoints());
177 $this->assertEquals([], $dataset->getAlternativeInformation());
The documentation for this class was generated from the following file: