RedUNIT\Base\Joins::checkBookNumbers PHP Method

checkBookNumbers() private method

Helper for the next test.
private checkBookNumbers ( array $books, string $numberList ) : void
$books array the books we are going to check
$numberList string the numbers that are expected
return void
    private function checkBookNumbers($books, $numberList)
    {
        $numbers = explode(',', $numberList);
        asrt(is_array($books), TRUE);
        asrt(count($books), count($numbers));
        $bookNumbers = '';
        $bookNumberArray = array();
        foreach ($books as $book) {
            asrt(isset($book->num), TRUE);
            asrt(isset($book->title), FALSE);
            $bookNumberArray[] = $book->num;
        }
        $bookNumbers = implode(',', $bookNumberArray);
        asrt($bookNumbers, $numberList);
    }