4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Form\Tests\Guess
;
14 use Symfony\Component\Form\Guess\Guess
;
16 class TestGuess
extends Guess
{}
18 class GuessTest
extends \PHPUnit_Framework_TestCase
20 public function testGetBestGuessReturnsGuessWithHighestConfidence()
22 $guess1 = new TestGuess(Guess
::MEDIUM_CONFIDENCE
);
23 $guess2 = new TestGuess(Guess
::LOW_CONFIDENCE
);
24 $guess3 = new TestGuess(Guess
::HIGH_CONFIDENCE
);
26 $this->assertSame($guess3, Guess
::getBestGuess(array($guess1, $guess2, $guess3)));
30 * @expectedException \InvalidArgumentException
32 public function testGuessExpectsValidConfidence()