class DollarFormatterTest in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/aklump/loft_data_grids/tests/phpunit/DollarFormatterTest.php \AKlump\LoftDataGrids\DollarFormatterTest
Hierarchy
- class \AKlump\LoftDataGrids\DollarFormatterTest extends \AKlump\LoftDataGrids\PHPUnit_Framework_TestCase
Expanded class hierarchy of DollarFormatterTest
Related topics
File
- vendor/
aklump/ loft_data_grids/ tests/ DollarFormatterTest.php, line 13 - Tests for the DollarFormatter class
Namespace
AKlump\LoftDataGridsView source
class DollarFormatterTest extends \PHPUnit_Framework_TestCase {
public function testFormatting() {
$obj = new DollarFormatter(98.59999999999999);
$this
->assertSame('$98.60', $obj
->get());
$obj = new DollarFormatter();
$this
->assertSame('$0.00', $obj
->get());
$obj = new DollarFormatter('$125.00');
$this
->assertSame('$125.00', $obj
->get());
$obj = new DollarFormatter('$65');
$this
->assertSame('$65.00', $obj
->get());
$obj = new DollarFormatter('123456');
$this
->assertSame('$123,456.00', $obj
->get());
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DollarFormatterTest:: |
public | function |