/** * Tests SortArray::sortByTitleProperty() input against expected output. * * @dataProvider providerSortByTitleProperty * @covers ::sortByTitleProperty * @covers ::sortByKeyString * * @param array $a * The first input item for comparison. * @param array $b * The second item for comparison. * @param integer $expected * The expected output from calling the method. */ public function testSortByTitleProperty($a, $b, $expected) { $result = SortArray::sortByTitleProperty($a, $b); $this->assertBothNegativePositiveOrZero($expected, $result); }
/** * Tests SortArray::sortByTitleProperty() input against expected output. * * @dataProvider providerSortByTitleProperty * * @param array $a * The first input item for comparison. * @param array $b * The second item for comparison. * @param integer $expected * The expected output from calling the method. * * @see \Drupal\Component\Utility\SortArray::sortByTitleProperty() * @see \Drupal\Tests\Component\Utility\SortArrayTest::SortByTitleProperty() */ public function testSortByTitleProperty($a, $b, $expected) { $result = SortArray::sortByTitleProperty($a, $b); $this->assertEquals($expected, $result); }