TestsCarbonIssetTest

The Simple Calendar Tests Carbon IssetTest class.

Defined (1)

The class is defined in the following location(s).

/vendor/nesbot/carbon/tests/Carbon/IssetTest.php  
  1. class IssetTest extends AbstractTestCase 
  2. public function testIssetReturnFalseForUnknownProperty() 
  3. $this->assertFalse(isset(Carbon::create(1234, 5, 6, 7, 8, 9)->sdfsdfss)); 
  4.  
  5. public function testIssetReturnTrueForProperties() 
  6. $properties = array( 
  7. 'year',  
  8. 'month',  
  9. 'day',  
  10. 'hour',  
  11. 'minute',  
  12. 'second',  
  13. 'dayOfWeek',  
  14. 'dayOfYear',  
  15. 'daysInMonth',  
  16. 'timestamp',  
  17. 'age',  
  18. 'quarter',  
  19. 'dst',  
  20. 'offset',  
  21. 'offsetHours',  
  22. 'timezone',  
  23. 'timezoneName',  
  24. 'tz',  
  25. 'tzName',  
  26. ); 
  27.  
  28. foreach ($properties as $property) { 
  29. $this->assertTrue(isset(Carbon::create(1234, 5, 6, 7, 8, 9)->$property));