enabled() public static method

Check for required PHP extension, or supported database feature.
public static enabled ( string $feature = null ) : boolean
$feature string Test for support for a specific feature, i.e. `'transactions'`.
return boolean Returns `true` if the particular feature (or if Sqlite) support is enabled, otherwise `false`.
Esempio n. 1
0
 public function testEnabledFeatures()
 {
     $supported = array('booleans', 'schema', 'relationships', 'sources');
     $notSupported = array('arrays', 'transactions');
     foreach ($supported as $feature) {
         $this->assertTrue(Sqlite3::enabled($feature));
     }
     foreach ($notSupported as $feature) {
         $this->assertFalse(Sqlite3::enabled($feature));
     }
     $this->assertNull(Sqlite3::enabled('unexisting'));
 }
Esempio n. 2
0
 public function testEnabledFeatures()
 {
     $this->assertTrue(Sqlite3::enabled());
     $this->assertTrue(Sqlite3::enabled('relationships'));
     $this->assertFalse(Sqlite3::enabled('arrays'));
 }