|
|
@@ -376,6 +376,25 @@ class UtilsTest extends TestCase
|
|
|
$this->assertEquals(null, $organizationUtils->getOrganizationWebsite($organization));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @see OrganizationUtils::getOrganizationWebsite()
|
|
|
+ */
|
|
|
+ public function testOrganizationWebsiteOutOfNetSubdomain(): void
|
|
|
+ {
|
|
|
+ $organizationUtils = $this->getOrganizationUtilsMockFor('getOrganizationWebsite');
|
|
|
+
|
|
|
+ $parameters = $this->getMockBuilder(Parameters::class)->getMock();
|
|
|
+ $parameters->method('getDesactivateOpentalentSiteWeb')->willReturn(false);
|
|
|
+ $parameters->method('getCustomDomain')->willReturn(null);
|
|
|
+
|
|
|
+ $organization = $this->getMockBuilder(Organization::class)->getMock();
|
|
|
+ $organization->method('getParameters')->willReturn($parameters);
|
|
|
+
|
|
|
+ $organizationUtils->method('getOrganizationActiveSubdomain')->with($organization)->willReturn('outofnet');
|
|
|
+
|
|
|
+ $this->assertEquals('https://opentalent.fr', $organizationUtils->getOrganizationWebsite($organization));
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @see Utils::isLastParentAndCMF()
|
|
|
*/
|