getPriority() public method

Return the priority of this TypeConverter. TypeConverters with a high priority are chosen before low priority.
public getPriority ( ) : integer
return integer
 /**
  * @test
  */
 public function checkMetadata()
 {
     $this->assertEquals(['string', 'array'], $this->converter->getSupportedSourceTypes(), 'Source types do not match');
     $this->assertEquals('object', $this->converter->getSupportedTargetType(), 'Target type does not match');
     $this->assertEquals(1, $this->converter->getPriority(), 'Priority does not match');
 }
コード例 #2
0
 /**
  * @test
  */
 public function checkMetadata()
 {
     $this->assertEquals(array('string', 'integer', 'float', 'boolean', 'array', \DateTimeInterface::class), $this->converter->getSupportedSourceTypes(), 'Source types do not match');
     $this->assertEquals('string', $this->converter->getSupportedTargetType(), 'Target type does not match');
     $this->assertEquals(1, $this->converter->getPriority(), 'Priority does not match');
 }
コード例 #3
0
 /**
  * @test
  */
 public function checkMetadata()
 {
     $this->assertEquals(['string'], $this->converter->getSupportedSourceTypes(), 'Source types do not match');
     $this->assertEquals(I18n\Locale::class, $this->converter->getSupportedTargetType(), 'Target type does not match');
     $this->assertEquals(1, $this->converter->getPriority(), 'Priority does not match');
 }