Skip to content

Instantly share code, notes, and snippets.

@zacharydanger
Created January 17, 2011 22:33
Show Gist options
  • Save zacharydanger/783624 to your computer and use it in GitHub Desktop.
Save zacharydanger/783624 to your computer and use it in GitHub Desktop.
Why our config is jacked.
<?php
class MyTestCase extends PHPUnit_Framework_TestCase {
public function testBoolEquality() {
$this->assertTrue((true == 'true'));
$this->assertTrue((true == (bool)'true'));
$this->assertTrue((true == 'false'));
$this->assertTrue((true == (bool)'false'));
$this->assertTrue((true == (bool)'1'));
$this->assertTrue((false == (bool)'0'));
$this->assertFalse((true == ''));
$this->assertTrue((false == (bool)''));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment