Changeset 1498

Show
Ignore:
Timestamp:
04/05/08 00:42:11 (4 months ago)
Author:
mikey
Message:

datespan code coverage improvements

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/test/php/net/stubbles/util/UtilTestSuite.php

    r1488 r1498  
    4040        $suite->addTestFile($dir . '/datespan/stubDateSpanMonthTestCase.php'); 
    4141        $suite->addTestFile($dir . '/datespan/stubDateSpanWeekTestCase.php'); 
     42        $suite->addTestFile($dir . '/datespan/stubDateSpanYesterdayTestCase.php'); 
    4243 
    4344        // logging api 
  • trunk/src/test/php/net/stubbles/util/datespan/stubDateSpanCustomTestCase.php

    r1288 r1498  
    2424    { 
    2525        $dateSpanCustom = new stubDateSpanCustom('2006-04-04', '2006-04-20'); 
    26         $this->assertEquals($dateSpanCustom->toString(), '04.04.2006 bis 20.04.2006'); 
     26        $this->assertEquals('04.04.2006 bis 20.04.2006', $dateSpanCustom->toString()); 
    2727    } 
    2828 
  • trunk/src/test/php/net/stubbles/util/datespan/stubDateSpanDayTestCase.php

    r1288 r1498  
    2424    { 
    2525        $dateSpanDay = new stubDateSpanDay('2007-04-04'); 
    26         $this->assertEquals($dateSpanDay->toString(), 'Wednesday, 04.04.2007'); 
     26        $this->assertEquals('Wednesday, 04.04.2007', $dateSpanDay->toString()); 
    2727    } 
    2828 
     
    5353        $dateSpanDay = new stubDateSpanDay('now'); 
    5454        $this->assertFalse($dateSpanDay->isFuture()); 
     55        $dateSpanDay = new stubDateSpanDay(); 
     56        $this->assertFalse($dateSpanDay->isFuture()); 
    5557    } 
    5658} 
  • trunk/src/test/php/net/stubbles/util/datespan/stubDateSpanMonthTestCase.php

    r1288 r1498  
    2424    { 
    2525        $dateSpanMonth = new stubDateSpanMonth(2007, 4); 
    26         $this->assertEquals($dateSpanMonth->toString(), '01.04.2007 bis 30.04.2007'); 
     26        $this->assertEquals('01.04.2007 bis 30.04.2007', $dateSpanMonth->toString()); 
     27        $dateSpanMonth = new stubDateSpanMonth(null, 4); 
     28        $this->assertEquals('01.04.' . date('Y') . ' bis 30.04.' . date('Y'), $dateSpanMonth->toString()); 
    2729    } 
    2830 
  • trunk/src/test/php/net/stubbles/util/datespan/stubDateSpanWeekTestCase.php

    r1288 r1498  
    2424    { 
    2525        $dateSpanWeek = new stubDateSpanWeek('2007-04-02'); 
    26         $this->assertEquals($dateSpanWeek->toString(), '02.04.2007 bis 08.04.2007'); 
     26        $this->assertEquals('02.04.2007 bis 08.04.2007', $dateSpanWeek->toString()); 
    2727    } 
    2828