* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) */ use PHPUnit\Framework\TestCase; use PrestaShop\Module\AutoUpgrade\PrestashopConfiguration; class PrestaShopConfigurationTest extends TestCase { public function testPrestaShopVersionInFile() { $class = new PrestashopConfiguration(__DIR__, __DIR__); $content = "assertSame('1.6.1.18', $class->findPrestaShopVersionInFile($content)); } /** * From PrestaShop 1.7.5.0, the version is stored in the class AppKernel */ public function testPrestaShopVersionInAppKernel() { $class = new PrestashopConfiguration(__DIR__, __DIR__); $this->assertSame( '1.7.6.0', $class->findPrestaShopVersionInFile( file_get_contents(__DIR__ . '/fixtures/AppKernelExample.php.txt') ) ); } }