Issues (57)

test/integration/Aggregation/MaxTest.php (1 issue)

1
<?php
2
declare(strict_types = 1);
3
4
namespace TBolier\RethinkQL\IntegrationTest\Aggregation;
5
6
use TBolier\RethinkQL\IntegrationTest\Operation\AbstractTableTest;
7
use TBolier\RethinkQL\Response\ResponseInterface;
8
9
class MaxTest extends AbstractTableTest
10
{
11
    /**
12
     * @return void
13
     * @throws \Exception
14
     */
15
    public function testMax(): void
16
    {
17
        $this->insertDocumentWithNumber(5, 99);
18
        $this->insertDocumentWithNumber(4, 77);
19
        $this->insertDocumentWithNumber(3, 1045);
20
        $this->insertDocumentWithNumber(2, 4);
21
        $this->insertDocumentWithNumber(1, 43534);
22
23
        /** @var ResponseInterface $res */
24
        $res = $this->r()
25
            ->table('tabletest')
26
            ->max('number')
27
            ->run();
28
29
        /** @var array $array */
30
        $array = $res->getData();
31
32
        $this->assertArraySubset(['number' => 43534], $array);
0 ignored issues
show
Deprecated Code introduced by
The function PHPUnit\Framework\Assert::assertArraySubset() has been deprecated: https://github.com/sebastianbergmann/phpunit/issues/3494 ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

32
        /** @scrutinizer ignore-deprecated */ $this->assertArraySubset(['number' => 43534], $array);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
33
    }
34
}
35