コード例 #1
0
 public function testMapColEnum()
 {
     $guesser = new Guesser();
     $mapping = $guesser->mapCol('test', 'nothingtocompare', 'enum', "'a','b','c'");
     $this->assertInternalType('array', $mapping);
     $this->assertArrayHasKey('method', $mapping);
     $this->assertEquals($mapping['method'], 'randomElement');
     $this->assertArrayHasKey('params', $mapping);
     $this->assertArrayHasKey(0, $mapping['params']);
     $this->assertInternalType('array', $mapping['params'][0][0]);
     $this->assertEquals('a,b,c', implode(',', $mapping['params'][0][0]));
     // check the version
     $version = $guesser->getVersion();
     $this->assertInternalType('string', $version);
 }