PHP Classes

File: tests/LegacyTraitCompatibilityTest.php

Recommend this page to a friend!
  Packages of Reinder Reinders   PHP Binary Flags   tests/LegacyTraitCompatibilityTest.php   Download  
File: tests/LegacyTraitCompatibilityTest.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Binary Flags
Manage a group of boolean flags using integers
Author: By
Last change:
Date: 1 month ago
Size: 344 bytes
 

Contents

Class file image Download
<?php

use Reinder83\BinaryFlags\Tests\Stubs\LegacyTraitFlags;

test('legacy binaryflags trait alias remains usable', function (): void {
   
$flags = new LegacyTraitFlags();
   
$flags->setMask(3);

   
expect($flags->getMask())->toEqual(3)
        ->
and($flags->checkFlag(1))->toBeTrue()
        ->
and($flags->checkFlag(4))->toBeFalse();
});