function DFPUnitTest::testDFPformatSize in Doubleclick for Publishers (DFP) 7
Same name and namespace in other branches
- 7.2 tests/dfp.test \DFPUnitTest::testDFPformatSize()
File
- tests/
dfp_unit.test, line 31 - Unit test file for DFP module.
Class
- DFPUnitTest
- @file Unit test file for DFP module.
Code
function testDFPformatSize() {
$sizes = '300x250';
$expected_result = '[300, 250]';
$this
->assertTrue(dfp_format_size($sizes) == $expected_result, 'The dfp_format_sizes function correctly handles an single size.');
$sizes = '300x250,728x90';
$expected_result = '[[300, 250], [728, 90]]';
$this
->assertTrue(dfp_format_size($sizes) == $expected_result, 'The dfp_format_sizes function correctly handles multiple sizes.');
}