function AddClassTest::testAdd
Very simple test of AddClass::add().
This is a very simple unit test of a single method. It has a single assertion, and that assertion is probably going to pass. It ignores most of the problems that could arise in the method under test, so therefore: It is not a very good test.
File
-
modules/
testing_example/ tests/ src/ Unit/ AddClassTest.php, line 46
Class
- AddClassTest
- AddClass units tests.
Namespace
Drupal\Tests\testing_example\UnitCode
public function testAdd() {
$sut = new AddClass();
$this->assertEquals($sut->add(2, 3), 5);
}