public function ElementTest::testOxford in Lightning Core 8.2
Same name in this branch
- 8.2 tests/src/Unit/ElementTest.php \Drupal\Tests\lightning_core\Unit\ElementTest::testOxford()
- 8.2 tests/src/Kernel/ElementTest.php \Drupal\Tests\lightning_core\Kernel\ElementTest::testOxford()
Same name and namespace in other branches
- 8.5 tests/src/Unit/ElementTest.php \Drupal\Tests\lightning_core\Unit\ElementTest::testOxford()
- 8 tests/src/Unit/ElementTest.php \Drupal\Tests\lightning_core\Unit\ElementTest::testOxford()
- 8.3 tests/src/Unit/ElementTest.php \Drupal\Tests\lightning_core\Unit\ElementTest::testOxford()
- 8.4 tests/src/Unit/ElementTest.php \Drupal\Tests\lightning_core\Unit\ElementTest::testOxford()
@covers ::oxford
File
- tests/
src/ Unit/ ElementTest.php, line 19
Class
- ElementTest
- @coversDefaultClass \Drupal\lightning_core\Element
Namespace
Drupal\Tests\lightning_core\UnitCode
public function testOxford() {
$this
->assertSame('foo, bar, and baz', Element::oxford([
'foo',
'bar',
'baz',
]));
$this
->assertSame('foo and bar', Element::oxford([
'foo',
'bar',
]));
$this
->assertSame('foo', Element::oxford([
'foo',
]));
$this
->assertEmpty(Element::oxford([]));
$this
->assertSame('Larry, Moe, or Curly', Element::oxford([
'Larry',
'Moe',
'Curly',
], 'or'));
}