Skip to content

Remove snake case #574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 1.1-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Validations.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public function validates_inclusion_or_exclusion_of($type, $attrs)
$enum = $options['within'];

if (!is_array($enum))
array($enum);
$enum = array($enum);

$message = str_replace('%s', $var, $options['message']);

Expand Down
12 changes: 6 additions & 6 deletions test/ActiveRecordCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@

class ActiveRecordCacheTest extends DatabaseTest
{
public function set_up($connection_name=null)
public function setUp($connection_name=null)
{
if (!extension_loaded('memcache'))
{
$this->markTestSkipped('The memcache extension is not available');
return;
}

parent::set_up($connection_name);
parent::setUp($connection_name);
ActiveRecord\Config::instance()->set_cache('memcache://localhost');
}

public function tear_down()
public function tearDown()
{
Cache::flush();
Cache::initialize(null);
}

public function test_default_expire()
{
$this->assert_equals(30,Cache::$options['expire']);
$this->assertEquals(30,Cache::$options['expire']);
}

public function test_explicit_default_expire()
{
ActiveRecord\Config::instance()->set_cache('memcache://localhost',array('expire' => 1));
$this->assert_equals(1,Cache::$options['expire']);
$this->assertEquals(1,Cache::$options['expire']);
}

public function test_caches_column_meta_data()
Expand All @@ -38,7 +38,7 @@ public function test_caches_column_meta_data()

$table_name = Author::table()->get_fully_qualified_table_name(!($this->conn instanceof ActiveRecord\PgsqlAdapter));
$value = Cache::$adapter->read("get_meta_data-$table_name");
$this->assert_true(is_array($value));
$this->assertTrue(is_array($value));
}
}

Loading